package com.gitee.helioz.openai.common.error;

import lombok.Getter;
import lombok.Setter;

/**
 * 〈OpenAi异常类〉
 *
 * @author <a href="https://gitee.com/helioz">Morning Starr</a>
 */
public class OpenAiErrorException extends Exception {

    @Getter
    @Setter
    private int errorCode = -99;

    public OpenAiErrorException(String message) {
        super(message);
    }

    public OpenAiErrorException(int errorCode, String message) {
        super(message);
        this.errorCode = errorCode;
    }

    public OpenAiErrorException(Throwable cause) {
        super(cause.getMessage(), cause);
    }

    public OpenAiErrorException(int errorCode, Throwable cause) {
        super(cause.getMessage(), cause);
        this.errorCode = errorCode;
    }

}
